{include file='imobile_header.tpl'}

<div id="topbar">
  <div id="leftnav">
    <a href="user_home.php"><img alt="home" src="./include/imobile/iwebkit/images/home.png" /></a>
  </div> 
  <div id="title"> 
    {lang_print id=11340063}
  </div>
  <div id="bluerightbutton"><a href="javascript:iMobile_toggleFilter('#content','#contentlist');">{lang_print id=11340057}</a></div>
</div>

<div id="content" style="display: none">
  
  <span class="graytitle">{lang_print id=11340059}</span>
  <form action="browse_groups.php" action="POST">
  <ul class="pageitem"> 
    <li class="select">
       <select name='v'>
		      <option value='0'{if $v == "0"} SELECTED{/if}>{lang_print id=2000127}</option>
		      {if $user->user_exists}<option value='1'{if $v == "1"} SELECTED{/if}>{lang_print id=2000128}</option>{/if}
       </select>
    </li>
    <li class="select">
       <select name='s'>
        <option value='group_totalmembers DESC'{if $s == "group_totalmembers DESC"} SELECTED{/if}>{lang_print id=2000129}</option>
        <option value='group_datecreated DESC'{if $s == "group_datecreated DESC"} SELECTED{/if}>{lang_print id=2000130}</option>
       </select>
    </li>
    <li class="select">
       <select name='groupcat_id'>
        <option value="">{lang_print id=2000131}</option>
         {section name=cat_loop loop=$cats}
          <option value="{$cats[cat_loop].cat_id}" {if $groupcat_id == $cats[cat_loop].cat_id}selected='selected'{/if} >{lang_print id=$cats[cat_loop].cat_title}</option>
            {section name=subcat_loop loop=$cats[cat_loop].subcats}
              <option value="{$cats[cat_loop].subcats[subcat_loop].subcat_id}" {if $groupcat_id == $cats[cat_loop].subcats[subcat_loop].subcat_id}selected='selected'{/if}> - {lang_print id=$cats[cat_loop].subcats[subcat_loop].subcat_title}</option>
            {/section}
         {/section}
       </select>
    </li>

  </ul>
  
    <div class="iButtons">
      <input name="submit" type="submit" value="{lang_print id=11340060}" class="iPush" /></li>
    </div>
  
  </form>
</div>

<div id="contentlist">


  {if $groups|@count == 0}
    
    <div class="boxinfo"> 
      {lang_print id=2000132}
    </div>  
  {else}
  
  <div id="tributton"> 
    <div class="links"> 
      {if $p != 1}<a href='browse_groups.php?s={$s}&v={$v}&groupcat_id={$groupcat_id}&p={math equation="p-1" p=$p}'>{lang_print id=182}</a>{else}<a href='browse_groups.php?s={$s}&v={$v}&groupcat_id={$groupcat_id}&p=1'>{lang_print id=182}</a>{/if}<a href="browse_groups.php">Home</a>{if $p != $maxpage}<a href='browse_groups.php?s={$s}&v={$v}&groupcat_id={$groupcat_id}&p={math equation="p+1" p=$p}'>{lang_print id=183}</a>{else}<a href='browse_groups.php?s={$s}&v={$v}&groupcat_id={$groupcat_id}&p={$maxpage}'>{lang_print id=183}</a>{/if}
      </div> 
  </div>   
    <div class="page_stats">
      {if $p_start == $p_end}
        {lang_sprintf id=184 1=$p_start 2=$total_groups}
      {else}
        {lang_sprintf id=185 1=$p_start 2=$p_end 3=$total_groups}
      {/if}
    </div>
    <ul class="records">  
    {section name=group_loop loop=$groups}
        <li class="record">
          <a href="{$url->url_create("group", $smarty.const.NULL, $groups[group_loop].group->group_info.group_id)}">
            <img class='photo' src='{$groups[group_loop].group->group_photo("./images/nophoto.gif", TRUE)}' border='0' />
              <span class="name">{$groups[group_loop].group->group_info.group_title}</span>
              <span class="arrow"></span>
          </a>
        </li>
    {/section}
    </ul>

  {/if}


</div>


{include file='imobile_footer.tpl'}

